package temp;

import java.io.*;
import java.net.Socket;

/**
 * @author oldliu
 * @since 1.0
 */
public class SocketClient {
    public static void main(String[] args) throws IOException {
        Socket s=new Socket("localhost",8888);
        InputStream in = s.getInputStream();
        OutputStream out = s.getOutputStream();
        BufferedReader br=new BufferedReader(new InputStreamReader(in));
        PrintWriter pw=new PrintWriter(out,true);
        String str=null;
        while ((str=br.readLine())!=null){
            System.out.println(str);
        }
        s.close();
    }
}
